

using Mono.Collections.Generic;
using System.Diagnostics;

namespace Mono.Cecil
{

    [DebuggerDisplay("{Name}", Name = "fieldDefinition")]
    public class FieldDefinitionRuntime : FieldDefinition
    {


        private FieldDefinition mabase;

        private TypeReference _sealedType;

        internal FieldDefinitionRuntime(FieldDefinition mabase, TypeReference sealedType)
        {
            this.mabase = mabase;
            this._sealedType = sealedType;
        }


        public override bool HasLayoutInfo { get { return this.mabase.HasLayoutInfo; } }

        public override int Offset
        {
            get { return this.mabase.Offset; }
            set { this.mabase.Offset = value; }
        }



        public override int RVA { get { return this.mabase.RVA; } }

        public override byte[] InitialValue
        {
            get { return this.mabase.InitialValue; }
            set { this.mabase.InitialValue = value; }
        }

        public override FieldAttributes Attributes
        {
            get { return this.mabase.Attributes; }
            set { this.mabase.Attributes = value; }
        }

        public override bool HasConstant
        {
            get { return this.mabase.HasConstant; }
            set { this.mabase.HasConstant = value; }
        }

        public override object Constant
        {
            get { return this.mabase.Constant; }
            set { this.mabase.Constant = value; }
        }



        public override bool HasCustomAttributes { get { return this.mabase.HasCustomAttributes; } }

        public override Collection<CustomAttribute> CustomAttributes { get { return this.mabase.CustomAttributes; } }

        public override bool HasMarshalInfo { get { return this.mabase.HasMarshalInfo; } }

        public override MarshalInfo MarshalInfo
        {
            get { return this.mabase.MarshalInfo; }
            set { this.mabase.MarshalInfo = value; }
        }

        #region FieldAttributes

        public override bool IsCompilerControlled
        {
            get { return this.mabase.IsCompilerControlled; }
            set { this.mabase.IsCompilerControlled = value; }
        }

        public override bool IsNotPublic
        {
            get { return this.mabase.IsNotPublic; }
            set { this.mabase.IsNotPublic = value; }
        }

        public override bool IsFamilyAndAssembly
        {
            get { return this.mabase.IsFamilyAndAssembly; }
            set { this.mabase.IsFamilyAndAssembly = value; }
        }

        public override bool IsAssembly
        {
            get { return this.mabase.IsAssembly; }
            set { this.mabase.IsAssembly = value; }
        }

        public override bool IsFamily
        {
            get { return this.mabase.IsFamily; }
            set { this.mabase.IsFamily = value; }
        }

        public override bool IsFamilyOrAssembly
        {
            get { return this.mabase.IsFamilyOrAssembly; }
            set { this.mabase.IsFamilyOrAssembly = value; }
        }

        public override bool IsPublic
        {
            get { return this.mabase.IsPublic; }
            set { this.mabase.IsPublic = value; }
        }

        public override bool IsStatic
        {
            get { return this.mabase.IsStatic; }
            set { this.mabase.IsStatic = value; }
        }

        public override bool IsInitOnly
        {
            get { return this.mabase.IsInitOnly; }
            set { this.mabase.IsInitOnly = value; }
        }

        public override bool IsLiteral
        {
            get { return this.mabase.IsLiteral; }
            set { this.mabase.IsLiteral = value; }
        }

        public override bool IsNotSerialized
        {
            get { return this.mabase.IsNotSerialized; }
            set { this.mabase.IsNotSerialized = value; }
        }

        public override bool IsSpecialName
        {
            get { return this.mabase.IsSpecialName; }
            set { this.mabase.IsSpecialName = value; }
        }

        public override bool IsPInvokeImpl
        {
            get { return this.mabase.IsPInvokeImpl; }
            set { this.mabase.IsPInvokeImpl = value; }
        }

        public override bool IsRuntimeSpecialName
        {
            get { return this.mabase.IsRuntimeSpecialName; }
            set { this.mabase.IsRuntimeSpecialName = value; }
        }

        public override bool HasDefault
        {
            get { return this.mabase.HasDefault; }
            set { this.mabase.HasDefault = value; }
        }

        #endregion

        public override bool IsDefinition
        {
            get { return this.mabase.IsDefinition; }
        }

        public override TypeDefinition DeclaringType
        {
            get { return this.mabase.DeclaringType; }
            set { this.mabase.DeclaringType = value; }
        }

        public override FieldDefinition Resolve()
        {
            return this;
        }

        public override TypeReference TypeMember
        {
            get { return this.mabase.Type(_sealedType); }
            set { this.mabase.TypeMember = value; }
        }

        public override string FullName
        {
            get { return this.mabase.FullName; }
        }

        public override string Name
        {
            get { return this.mabase.Name; }
            set { this.mabase.Name = value; }
        }

        internal override bool ContainsGenericParameter
        {
            get { return this.mabase.ContainsGenericParameter; }
        }

        public override TypeReference Type(TypeReference sealedType)
        {
            return this.mabase.Type(sealedType);
        }

        public override MetadataToken MetadataToken
        {
            get { return this.mabase.MetadataToken; }
            set { this.mabase.MetadataToken = value; }
        }

        internal override bool HasImage { get { return this.mabase.HasImage; } }

        public override ModuleDefinition Module
        {
            get { return this.mabase.Module; }
        }


        internal override string MemberFullName()
        {
            return this.mabase.MemberFullName();
        }

        public override string ToString()
        {
            return this.mabase.FullName;
        }


    }

}